#include <iostream>

class Solution
{
public:
    int main()
    {
        int n;
        std::cin >> n;
        bool b1 = !(n & 1);
        bool b2 = (n > 4) && (n <= 12);
        bool p1 = b1 && b2;
        bool p2 = b1 || b2;
        bool p3 = (b1 && !b2) || (b2 && !b1);
        bool p4 = !b1 && !b2;
        std::cout << p1 << " " << p2 << " " << p3 << " " << p4;
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif